<?php

namespace Database\Seeders;

use App\Models\SysUser;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;

class SysUserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        //
        \App\Models\SysUser::factory(10)->create();

        // 单独处理第一个用户的数据
        $user = SysUser::find(1);
        $user->username = 'admin';
        $user->nickname = '管理';
        $user->password = Hash::make('123456');
        $user->save();

    }
}
